<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport" />
    <link rel="stylesheet" href="{TG_URL_ARES}weiui/weui.min.css">
    <link rel="stylesheet" href="{TG_URL_ARES}weiui/jquery-weui.min.css">
    <link rel="stylesheet" href="{TG_URL_ARES}xiangxiu/css/aliicon/font.css"/>
    <link rel="stylesheet" href="{TG_URL_ARES}xiangxiu/css/swiper.min.css"/>
    <link rel="stylesheet" href="{TG_URL_ARES}xiangxiu/css/common.css"/>
    <script src="{TG_URL_ARES}xiangxiu/weiui/jquery-2.1.4.js"></script>
    <script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>  
    <script src="{TG_URL_ARES}xiangxiu/js/cartFly.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-weui/1.0.1/js/jquery-weui.min.js"></script>
    <script src="{TG_URL_ARES}xiangxiu/js/swiper.min.js"></script>
    <script src="//cdn.bootcss.com/jquery-weui/1.0.1/js/city-picker.min.js"></script>
    <script src="{TG_URL_ARES}xiangxiu/js/common.js"></script>
    <script src="//webapi.amap.com/maps?v=1.3&key=68cea1fa9bee514f9c9d6afcefb477b8&plugin=AMap.MouseTool"></script>
    <title>{$config['tginfo']['sname']}</title>
    {php echo register_jssdk();}
    <script>
        wx.ready(function () {
            var shareData = {
                title: "{$config['share']['share_title']}"||document.title,
                desc:"{$config['share']['share_desc']}" ,
                link: "{$tourl}",
                imgUrl: "{php echo tomedia($config['share']['share_image'])}"
            };
            //分享朋友
            wx.onMenuShareAppMessage({
                title: shareData.title,
                desc: shareData.desc,
                link: shareData.link,
                imgUrl: shareData.imgUrl,
                trigger: function (res) {
                    //alert(shareData.desc);
                },
                success: function (res) {
                    //alert(shareData.desc);
                },
                cancel: function (res) {
                    //alert(shareData.desc);
                },
                fail: function (res) {
                    //alert(JSON.stringify(res));
                }
            });
            //朋友圈
            wx.onMenuShareTimeline({
                title: shareData.title,
                link: shareData.link,
                imgUrl: shareData.imgUrl,
                trigger: function (res) {
                },
                success: function (res) {
                },
                cancel: function (res) {
                },
                fail: function (res) {
                    alert(JSON.stringify(res));
                }
            });
            //获取地理位置
            wx.getLocation({
                type: 'gcj02', //返回可以用于wx.openLocation的经纬度
                success: function (res) {
                    var location={
                        latitude:res.latitude,
                        longitude:res.longitude
                    };
                    sessionStorage.setItem('location',JSON.stringify(location));
                    console.log(location);
                }
            });
        });


        var commonURL="{$_W['siteroot']}"+"minapi.php?uniacid={$_W['uniacid']}&";
        var indexUrl="{php echo app_url('goods/list')}";//首页url
        var detailurl="{php echo app_url('goods/detail');}";//详情页URL
        var searchUrl = "{php echo app_url('goods/list/search')}";//搜索Url
        var urlorder="{php echo app_url('order/shoporderconfirm')}";//订单提交页url
        var personnelUrl="{php echo app_url('order/personnelList')}";//技师列表页url
        var personnelDetailUrl="{php echo app_url('order/personnelListDetail')}";//技师详情url
        var orderUrl="{php echo app_url('order/order')}";//订单列表

        var ajaxCar=commonURL+"op=collect_list&openid={$_W['openid']}"; //加载购物车
        var addCar=commonURL+"op=collect_add&openid={$_W['openid']}";//购物车加
        var minusCar=commonURL+"op=collect_remove&openid={$_W['openid']}";//购物车减
        var clearCartList =commonURL+"op=collect_clear&openid={$_W['openid']}";//清空购物车
        var ajaxAddress =commonURL+"op=addresslist&openid={$_W['openid']}";//加载收货地址
        var addressmoren =commonURL+"op=address&openid={$_W['openid']}";//加载默认收货地址
        var addressEdit =commonURL+"op=address_edit&openid={$_W['openid']}";//保存收货地址
        var addressDel =commonURL+"op=address_del&openid={$_W['openid']}";//删除收货地址
        var salerlist =commonURL+"op=saler_list&openid={$_W['openid']}";//技师列表——筛选 form order
        var saleralllist =commonURL+"op=saler_alllist&openid={$_W['openid']}";//技师列表——筛选  lists
        var myjishi =commonURL+"op=my_order_jishi&openid={$_W['openid']}";//技师列表——筛选  form user
        var salerDetail =commonURL+"op=jishi_detail&openid={$_W['openid']}";//技师详情页
        var checkOrder =commonURL+"op=check_neworder&openid={$_W['openid']}";//下单
        var order_jishi_time =commonURL+"op=order_jishi_time&openid={$_W['openid']}";//技师时间筛选
        var before_pay_check=commonURL+"op=before_pay_check&openid={$_W['openid']}";//支付前校验
        var paycash="{php echo app_url('pay/cash')}";//支付
        var couponajax="{php echo app_url('order/shoporderconfirm',array('op'=>'couponajax'))}&openid={$_W['openid']}";//优惠券

    </script>